/**
 * $Id$
 * Copyright 2011-2014 Oak Pacific Interactive. All rights reserved.
 */
package com.malphi.framework.core.xmlconfig;

import java.util.HashMap;
import java.util.Map;

import com.malphi.framework.core.xmlparse.ConfigParser;

/**
 * @author <a href="mailto:ruofei.ma@renren-inc.com">ma ruofei</a>
 * @version 1.0 2011-11-22 上午11:04:20
 * @since 1.0
 */
public class ConfigFactory {

    private static Map<Class<? extends XmlConfig>, XmlConfig> configMap = 
                                        new HashMap<Class<? extends XmlConfig>, XmlConfig>();

    static {
        Config[] configs = Config.values();
        for (int i = 0; i < configs.length; i++) {
            configMap.put(configs[i].getConfigClass(), ConfigParser.getConfig(configs[i]));
        }
    }

    public static Map<Class<? extends XmlConfig>, XmlConfig> getConfigMap() {
        return configMap;
    }

}
